$ var foo = {
    name: "Frank",
    toString: function() {
        return this.name;
    }
};
<tag foo=foo/>
<tag foo=foo/>